home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / keyinp.zip / KEYIDEMO.PAS < prev   
Pascal/Delphi Source File  |  1993-01-04  |  854b  |  36 lines

  1. program KeyIDemo;
  2.  
  3. uses crt, dos, GS_KeyI;
  4.  
  5. var
  6.    lin  : string[80];
  7.    numi : integer;
  8.    numr : real;
  9.  
  10. {$F+}
  11. procedure tst;
  12. begin
  13.    window(1,20,80,24);
  14.    ClrScr;
  15.    gotoxy(20,1);
  16.    case GS_KeyI_Chr of
  17.       #59 : write('Function Key F1 Pressed');
  18.       #60 : write('Function Key F2 Pressed');
  19.       #61 : write('Function Key F3 Pressed');
  20.       #62 : write('Function Key F4 Pressed');
  21.       #71 : write('The Home Key was Pressed');
  22.       #79 : write('The End Key was Pressed');
  23.    else
  24.       write(#7);
  25.    end;
  26.    window(1,1,80,25);
  27. end;
  28. {$F-}
  29.  
  30. begin
  31.    clrscr;
  32.    GS_KeyI_Hlp := @tst;
  33.    lin := GS_KeyI_T(true, 8,10,1,1,'Enter Text Field: ','empty');
  34.    numi := GS_KeyI_I(true, 2,10,2,2,'Enter Integer Field (0-50): ',0,0,50);
  35.    numr:= GS_KeyI_R(true, 6,10,3,3,'Enter Real Field (0-99.99): ',0,0,99.99,2);
  36. end.